package cc.facesign.common.utils.bean;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
public class XhttpR {

    public static Integer SUCCESS = 0;

    private Map<String, Object> data = new HashMap<>();

    public static XhttpR ok() {
        XhttpR r = new XhttpR();
        r.data.put("Code", SUCCESS);
        r.data.put("Msg", "success");
        return r;
    }

    public static Map<String, Object> data(Object data) {
        XhttpR r = ok();
        r.data.put("Data", data);
        return r.data;
    }
}
